package com.shigui.news.enums;

public enum Sex {
	
	MALE("1", "男"), FEMALE("2", "女"), UNKNOW("3", "未知");
	
	private Sex(String code, String description){
		this.code = code;
		this.description = description;
	}
	
	private String code;
	private String description;
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	public static String getDescription(String code){
		System.out.println(code);
		switch (code) {
		case "1":
			return MALE.getDescription();
		case "2":
			return FEMALE.getDescription();
		default:
			return UNKNOW.getDescription();
		}
	}
}
